<div v-show="showEdit" id="showEdit" style="display: none;" class="panel panel-default">
    <div class="panel-heading"><i class="fa fa-reply" @click="reload" aria-hidden="true" style="cursor: pointer;"></i> {{title}}</div>
    <form name="formEdit" action="" method="post" class="form-horizontal">
        <input type="hidden" name="@{crud.primaryKey }" v-model="model.@{crud.primaryKey }"/>
        #for(entry in crud.editMap){ #
        #
        var key = entry.value.key;
        var name = entry.value.javaKey;
        var value = 'model.'+entry.value.javaKey;
        var data = flyfox.dataList(entry.value.formTypeData);
        // 验证
        var valid = "";
        var isNull = entry.value.isNull;
        var isNumber = entry.value.isNumber;
        if(!strutils.isEmpty(entry.value.formTypeValid)){
        valid = entry.value.formTypeValid;
        } else if(entry.value.formType=='SELECT' && !isNull) {
        valid = " valid='vselect' validname='" + entry.value.name + "' ";
        } else if(entry.value.formType=='DICT' && !isNull) {
        valid = " valid='vselect' validname='" + entry.value.name + "' ";
        } else if(entry.value.formType=="INPUT") {
        if(isNumber && isNull) {
        valid = " valid='vnum' validname='" + entry.value.name + "' ";
        } else if(isNumber && !isNull) {
        valid = " valid='vnum_y' validname='" + entry.value.name + "' ";
        } else if(!isNull) {
        valid = " valid='vtext' validname='" + entry.value.name + "' ";
        }
        }
        #
        <div class="form-group">
            <div class="col-sm-2 control-label">@{entry.value.name}</div>
            <div class="col-sm-10">
                # if (entry.value.formType=="INPUT") {#
                #if (entry.value.inputType=='TEXT') { #
                <input class="form-control" type="text" name="@{name}" v-model="@{value}" @{valid }/>
                #
                } else if (entry.value.inputType=='RADIO') {
                layout("util/radio.html",{obj:data,name:value}){ }
                } else if (entry.value.inputType=='CHECKBOX') {
                layout("util/checkbox.html",{obj:data,name:value}){ }
                } else {
                #
                <input class="form-control" type="@{entry.value.inputType}" name="@{name}" v-model="@{value}" @{valid
                       }/>
                #} #
                #} else if (entry.value.formType=='TEXTAREA') { #
                <textarea class="form-control" rows="3" cols="30" name="@{name}" v-model="@{value}" @{valid
                          }></textarea>
                #} else if (entry.value.formType=='DICT') { #
                <select name="@{name}" v-model="@{value}" class="form-control" @{valid }>
                    ${flyfox.dictSelect('@{entry.value.formTypeData}' , @{value}!'') }
                </select>
                #} else if (entry.value.formType=='SELECT') { #
                <select name="@{name}" v-model="@{value}" class="form-control" @{valid }>
                    # layout("util/select.html",{obj:data,name:value}){ } #
                </select>
                #}#
            </div>
        </div>
        #} #

        <div style="height: 10px;clear: both;">&nbsp;</div>
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <div class="col-sm-10">
                <a href="javascript:void(0);" class="btn btn-primary" @click="save">保 存</a>
                <a href="javascript:void(0);" class="btn btn-primary" @click="reload">返 回</a>
            </div>
        </div>

    </form>
</div>